package com.landcode.netty.util;

import java.util.Optional;
import com.landcode.netty.handler.ConstantsChannel;
import io.netty.channel.Channel;


public class ChannelUtil {
	public static String getDeviceSn(Channel channel) {
		return Optional.ofNullable(channel)
				.map(channel1 -> channel1.attr(ConstantsChannel._deviceSn).get())
				.orElse(null);
	}
}
